package com.tchintech.pay.delegate;

import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.tchintech.pay.R;
import com.tchintech.pay.frame.view.AppDelegate;

import butterknife.Bind;

/**
 * Created by Administrator on 2017/7/7 0007.
 */

public class LostPassworddelegate extends AppDelegate {
    @Bind(R.id.lost_tv_tips)
    TextView lostTvTips;
    @Bind(R.id.lost_ed_phoneNumber)
    EditText lostEdPhoneNumber;
    @Bind(R.id.lost_ed_password)
    EditText lostEdPassword;
    @Bind(R.id.lost_ed_confirmPassword)
    EditText lostEdConfirmPassword;
    @Bind(R.id.lost_ed_verify_code)
    EditText lostEdVerifyCode;
    @Bind(R.id.password_code)
    TextView password_code;
    @Bind(R.id.password_rel)
    RelativeLayout password_rel;

    @Bind(R.id.lost_bt_confirm)
    Button lostBtConfirm;
    @Bind(R.id.tv_title)
    TextView tv_title;
    @Bind(R.id.iv_back)
    ImageView imageView;



    @Override
    public int getRootLayoutId() {
        return R.layout.activity_lostpassword;
    }
    public void setVisible() {
        imageView.setVisibility(View.VISIBLE);
    }

    public void setTitle(String str) {
        tv_title.setText(str);
    }
    //获取组件中的值
    public String getText(int id) {
        String text = "";
        try {
            EditText et = get(id);
            text = et.getText().toString().trim();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return text;
    }

    ;

    //获取view
    public TextView getTextView(int id) {
        TextView text = null;
        try {
            text = get(id);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return text;
    }

    ;

    /**
     * 设置错误信息
     */
    public void setError(String str) {
        lostTvTips.setText(str);
    }


}
